#include <iostream>
using namespace std;

struct tree
{
	char data;
	tree* left=nullptr;
	tree* right=nullptr;
};

void qian(tree* t)
{
	if(t==nullptr)
		return;
	cout<<t->data;
	qian(t->left);
	qian(t->right);
}

void zhong(tree* t)
{
	if(t==nullptr)
		return;
	zhong(t->left);
	cout<<t->data;
	zhong(t->right);
}

void hou(tree* t)
{
	if(t==nullptr)
		return;
	hou(t->left);
	hou(t->right);
	cout<<t->data;
}